Conversation
|
Oh nice! Thank you for doing this work. I'll have a read. I started tinkering with php-ffi here: Just an experiment, currently unfinished, etc. |
|
Thanks, I'll take a look! Do you plan on keeping the same API with the FFI Implementation? |
|
I was planning to redo it along the lines of pyvips --- so I'd make classes to wrap GValue and GObject, then use those to write php-vips would look the same to users of that interface, but have a new backend. |
|
I've done some first stuff in that vein (I hope) on my branch here. I'll try to extend that a bit, seems to be going well so far though. Not sure about On another note, did you have time to do a lookover for this PR? Or do you want me to create a PR for the change in php-vips first? |
|
I've mostly done a php ffi wrapper for libvips here: It needs breaking into a set of classes, some stubs fleshing out, and some tidying up, but it does seem to work. I see: So that's picking a loader for a test JPG file, making the loader, introspecting to get the args, setting the filename, building the operation, and pulling out the constructed image. I think the next step is to copy-paste chunks of that into the php binding to replace php-vips-ext. |
Hey, since we spoke about this in the issue I've gone ahead and added the method to the extension.
I'm not a C Dev, so apoligies if anything's amiss. The tests all pass (and I don't think I've seen a codestyler), so the PR should be okay.
The only thing I'm not entirely certain about is the
gvaluefield that contains the fields. I've tried to unref it withg_object_unrefbut that Segfaults. It currently doesn't report any memory leaks, so I guess it's alright?Next Step is going to add it to the PHP Lib. After I've done that I may do an experiment over the holidays in regards to PHP FFI, but I can't promise anything yet.